//
//  ZXUIFontExtension.swift
//  ExtensionTest
//
//  Created by ZX on 2025/2/6.
//

import UIKit


public extension UIFont {
    class func c(_ fontName: String, _ fontSize: CGFloat) -> UIFont {
        return UIFont(name: fontName, size: fontSize) ?? UIFont.systemFont(ofSize: fontSize)
    }
    class func regular(_ fontSize: CGFloat) -> UIFont{
        return UIFont.c("PingFangSC-Regular", fontSize)
    }
    class func medium(_ fontSize: CGFloat) -> UIFont{
        return UIFont.c("PingFangSC-Medium", fontSize)
    }
    class func semibold(_ fontSize: CGFloat) -> UIFont{
        return UIFont.c("PingFang-SC-Semibold", fontSize)
    }
}
